﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="P_PersonalDetails.MembershipDetails"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:rc="clr-namespace:RefCodes;assembly=RefCodes"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary Source="FormStyling.xaml"/>
    </UserControl.Resources>
    <Border Style="{StaticResource BoxBorder}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions >
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <TextBlock Style="{StaticResource BoxHeading}" Grid.ColumnSpan="4">
                <Run Text="{Binding Year}"/>
                <Run Text="Membership for"/>
                <Run Text="{Binding FullName}"/>
                <Run Text=" Renewal Due:"/>
                <Run Text="{Binding RenewalDue}"/>
            </TextBlock>
            
            <TextBlock Grid.Row="1" Grid.ColumnSpan="2">Age at Start of Membership Year</TextBlock>
            <TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding Age}"/>
            
            <TextBlock Grid.Row="2" Grid.ColumnSpan="2">Membership Type (Please Select)</TextBlock>
            <rc:RefCodesComboBox Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" CodeType="4" SelectedID="{Binding MembershipType, Mode=TwoWay, ValidatesOnExceptions=True}" Margin="2"/>
  
            <TextBlock Grid.Row="3">BCUMember</TextBlock>
            <CheckBox Grid.Row="3" Grid.Column="1" IsChecked="{Binding BCUCardReqd, Mode=TwoWay, ValidatesOnExceptions=True}"/>
            <TextBlock Grid.Row="3" Grid.Column="2">BCU Number</TextBlock>
            <TextBox x:Name="BCUNoTextBox" Grid.Row="3" Grid.Column="3" Text="{Binding BCUNumber, Mode=TwoWay, ValidatesOnExceptions=True}" Margin="2"/>
            
            <TextBlock Grid.Row="4" Grid.Column="2">BCU Renewal Date</TextBlock>
            <sdk:DatePicker Grid.Row="4" Grid.Column="3" SelectedDate="{Binding BCURenewalDate, Mode=TwoWay, ValidatesOnExceptions=True}" Margin="2"/>
  
            <RichTextBox FontSize="14" Grid.Row="5" Grid.ColumnSpan="4" IsReadOnly="True" Background="Transparent" BorderBrush="Transparent" GotFocus="Unfocusable" Cursor="Arrow" MouseEnter="UpdateCursor">
                <Paragraph>
                    <Run Text="If you are not a member of the BCU or your membership has expired then you will be charged an additional £2 to cover club insurance.   You must join the BCU to compete in slalom division 3 or above.  To join the BCU go to "/>
                    <Hyperlink NavigateUri="http://www.canoe-england.org.uk/membership/" TargetName="_blank">
                        <Run Text="http://www.canoe-england.org.uk/membership/"/>
                    </Hyperlink>
                </Paragraph>
                <Paragraph />
                <Paragraph>
                    <Run Text="BCU membership covers your kayak/canoe Thames River Licence.  If you are not a member and have your own boat you can get a licence from "/>
                    <Hyperlink NavigateUri="http://www.environment-agency.gov.uk/static/documents/Leisure/unpowered_registration_form.pdf" TargetName="_blank">
                        <Run Text="here"/>
                    </Hyperlink>
                </Paragraph>
            </RichTextBox>
        </Grid>
    </Border>
</UserControl>
